import request from "@/utils/request";

//列表查询
export const queryPageApi=(name,begin,end,page,pageSize)=>
  request.get(`/clazzs?name=${name}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`);

//新增班级
export const addClazzApi=(clazz) =>request.post("/clazzs",clazz);

//根据id查询数据
export const queryByIdApi=(id) =>request.get(`/clazzs/${id}`);


//修改
export const updateApi=(clazz) =>request.put("/clazzs",clazz);

//删除
export const deleteApi=(id) =>request.delete(`/clazzs/${id}`);

//查询全部数据
export const listApi=()=>request.get("/clazzs/list");